<!--
  描述：渠道标示列表页
  @author jiafei
  @since 2021/12/06 11:23
-->
<!DOCTYPE html SYSTEM "http://www.thymeleaf.org/dtd/xhtml1-strict-thymeleaf-4.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org">

<head th:include="common/common :: jscss">
    <title>关联渠道管理</title>
</head>
<body>

<div class="layui-fluid">

    <!--面包屑-->
    <blockquote class="layui-crumb">
        渠道管理>营销业务管理>
        <a lay-href="/channel/mark/list.action" lay-text="渠道标示管理" th:text="标示管理">标示管理</a>
        >
        <a th:lay-href="|/channel/mark/group/list.action?markId=${obj.markId}|" th:text="${obj.name}"></a>
        > 关联渠道管理
    </blockquote>

    <div class="layui-card">

        <div class="layui-split">&nbsp;</div>

        <form method="post" class="layui-form" id="zmn-query" action="/channel/mark/group/list.action" lay-filter="zmn-query">
            <div class="layui-form" th:include="channel/mark/group/_query :: query "></div>
        </form>

        <div class="layui-card-body">
            <div th:replace="channel/mark/group/_table::table"/>
            <script type="text/html" id="zmn-table-tool">
                <div class="layui-btn-container">
                    <div class="layui-btn-group">
                        <zmn th:if="${#authPermit.checkPermit('/channel/mark/group/assChannels/list.action')}">
                            <a class="layui-btn layui-btn-sm"
                               th:lay-href="|${SYS_PLAT}/channel/mark/group/assChannels/list.action?markId=${vo.markId}|">关联渠道</a>
                        </zmn>
                    </div>
                    <div class="layui-btn-group">
                        <zmn th:if="${#authPermit.checkPermit('/channel/mark/group/assChannels/delChannel.action')}">
                            <a class="layui-btn layui-btn-sm layui-btn-danger" lay-event="delChannel"
                               lay-text="解除关联" text="解除关联">解除关联</a>
                        </zmn>
                    </div>
                    <div class="layui-btn-group">
                        <zmn th:if="${#authPermit.checkPermit('/channel/mark/group/assChannels/updateMark.action')}">
                            <a class="layui-btn layui-btn-sm layui-btn-primary" style="background-color: #70B603;color: white" lay-event="updateMark"
                               lay-text="标示调整" text="标示调整">标示调整</a>
                        </zmn>
                    </div>
                </div>


            </script>
        </div>

    </div>
</div>

<style type="text/css">
    .zmn-form-item .item-inline .inline-box {
        float: none !important;
    }

    .zmn-form-item .item-inline .inline-box .inline-box-cc {
        margin-left: 135px !important;
    }

    .zmn-form-item .item-inline {
        width: 500px;
    }
</style>

<script type="text/javascript" th:inline="javascript">

    var json = {
        totalCount: [[${vo.totalCount}]],
        pageSize: [[${vo.pageSize}]],
        pageIndex: [[${vo.pageIndex}]],
        items: [[${items}]],
        vo: [[${vo}]]
    };

    layui.config({
        base: "/static/lay/",
        version: 20211206186533
    }).extend({
        index: "lib/index",
        plat_channel_mark_group_list: "channel/mark/group/zmn.plat.channel.mark.group.list",
    }).use(['index', 'plat_channel_mark_group_list']);

</script>
</body>

<div id="inOutHtml" hidden>
    <form method="POST" action="#" class="layui-form">
        <input type="hidden" id="oldMarkId" lay-verify="required|number" name="oldMarkId" th:value="${obj.markId}"/>
        <div class="layui-form-item"></div>
        <div class="layui-form-item">
            <label class="layui-form-label layui-form-required">当前标示名称：</label>
            <div class="layui-input-inline" style="width:300px">
                <input type="text" name="name" placeholder="" th:value="${obj.name}"
                       lay-verType="tips" autocomplete="off" class="layui-input" maxlength="9" disabled/>
            </div>
        </div>

        <div class="layui-form-item">
            <label class="layui-form-label layui-form-required">目标标示名称：</label>
            <div class="layui-input-inline" style="width:300px">
                <select lay-filter="newMarkId" id="newMarkId" name="newMarkId" lay-search lay-verify="required|number">
                    <option value=""></option>
                    <option th:each="mark:${markList}" th:value="${mark.markId}" th:selected="${mark.markId == obj.markId}" th:text="${mark.name}"/>
                </select>
            </div>
            <div>
                <span class="layui-input-inlin" style="display: inline-block;width: auto; color: red;padding-left: 180px;padding-right: 125px">
                    提交成功后，该渠道会从该列表消失，同时移动至目标标示名称下的关联渠道管理</span>
            </div>
        </div>

        <div class="item-submit">
            <div style="text-align: center">
                <button class="layui-btn" id="zmn-form-mark-update" lay-submit lay-filter="zmn-form-mark-update">提交</button>
                <a class="layui-btn layui-btn-primary" id="markSubCancel">取消</a>
            </div>
        </div>
    </form>
    <style type="text/css">
        .layui-form-item .layui-form-label {
            min-width: 150px !important;
        }

        .layui-form-select dl {
            max-height: 200px;
        }
    </style>
</div>
</html>

